## API Report File for "@backstage/plugin-cicd-statistics"

> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).

```ts
/// <reference types="react" />

import { ApiRef } from '@backstage/core-plugin-api';
import { BackstagePlugin } from '@backstage/core-plugin-api';
import { Entity } from '@backstage/catalog-model';
import { RouteRef } from '@backstage/core-plugin-api';

// @public
export class AbortError extends Error {}

// @public
export interface Build {
  branchType: FilterBranchType;
  duration: number;
  id: string;
  // (undocumented)
  raw?: unknown;
  requestedAt: Date;
  stages: Array<Stage>;
  status: FilterStatusType;
  triggeredBy?: TriggerReason;
}

// @public
export type BuildWithRaw<T = any> = Build & {
  raw: T;
};

// @public
export type ChartType = 'duration' | 'count';

// @public
export type ChartTypes = Array<ChartType>;

// @public
export interface CicdConfiguration {
  availableStatuses: ReadonlyArray<FilterStatusType>;
  defaults: Partial<CicdDefaults>;
  formatStageName: (parentNames: Array<string>, stageName: string) => string;
}

// @public
export interface CicdDefaults {
  chartTypes: Record<FilterStatusType, ChartTypes>;
  collapsedLimit: number;
  // (undocumented)
  filterStatus: Array<FilterStatusType>;
  // (undocumented)
  filterType: FilterBranchType | 'all';
  hideLimit: number;
  lowercaseNames: boolean;
  normalizeTimeRange: boolean;
  // (undocumented)
  timeFrom: Date;
  // (undocumented)
  timeTo: Date;
}

// @public
export interface CicdState {
  // (undocumented)
  builds: Array<Build>;
}

// @public
export interface CicdStatisticsApi {
  // (undocumented)
  fetchBuilds(options: FetchBuildsOptions): Promise<CicdState>;
  // (undocumented)
  getConfiguration(
    options: GetConfigurationOptions,
  ): Promise<Partial<CicdConfiguration>>;
}

// @public (undocumented)
export const cicdStatisticsApiRef: ApiRef<CicdStatisticsApi>;

// @public (undocumented)
export const cicdStatisticsPlugin: BackstagePlugin<
  {
    entityContent: RouteRef<undefined>;
  },
  {}
>;

// @public (undocumented)
export const EntityCicdStatisticsContent: EntityPageCicdCharts;

// @public (undocumented)
export function EntityPageCicdCharts(): JSX.Element;

// @public
export interface FetchBuildsOptions {
  // (undocumented)
  abortSignal: AbortSignal;
  // (undocumented)
  entity: Entity;
  // (undocumented)
  filterStatus: Array<FilterStatusType | 'all'>;
  // (undocumented)
  filterType: FilterBranchType | 'all';
  // (undocumented)
  timeFrom: Date;
  // (undocumented)
  timeTo: Date;
  // (undocumented)
  updateProgress: UpdateProgress;
}

// @public
export type FilterBranchType = 'master' | 'branch';

// @public
export type FilterStatusType =
  | 'unknown'
  | 'enqueued'
  | 'scheduled'
  | 'running'
  | 'aborted'
  | 'succeeded'
  | 'failed'
  | 'stalled'
  | 'expired';

// @public
export interface GetConfigurationOptions {
  // (undocumented)
  entity: Entity;
}

// @public
export interface Stage {
  duration: number;
  // (undocumented)
  name: string;
  stages?: Array<Stage>;
  status: FilterStatusType;
}

// @public (undocumented)
export const statusTypes: Array<FilterStatusType>;

// @public (undocumented)
export type TriggerReason =
  /** Triggered by source code management, e.g. a Github hook */
  | 'scm'
  /** Triggered manually */
  | 'manual'
  /** Triggered internally (non-scm, or perhaps after being delayed/enqueued) */
  | 'internal'
  /** Triggered for some other reason */
  | 'other';

// @public (undocumented)
export const triggerReasons: Array<TriggerReason>;

// @public
export interface UpdateProgress {
  // (undocumented)
  (completed: number, total: number, started?: number): void;
  // (undocumented)
  (
    steps: Array<{
      title: string;
      completed: number;
      total: number;
      started?: number;
    }>,
  ): void;
}

// (No @packageDocumentation comment for this package)
```
